package com.yueya.im.node.util;


import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public class CacheUtil {
    private static List<String> userList = new CopyOnWriteArrayList();

    public static List<String> getUserList() {
        return userList;
    }
    public static void addItem(String userId){
        long count = userList.stream().filter(r->r.equals(userId)).count();
        if(count == 0){
            userList.add(userId);
        }
    }
}
